{% extends "base.html" %}


{% block body_page %}
<script type="text/javascript">
var timer;
$(document).ready(function(){
     timer=setInterval( " refreshTime() ", 10000 );
})

function refreshTime(){
        var d=new Date();
        var g=$("#box").scrollTop()+500;
	$.get("{{loginterface}}/?r="+$('#filename').val()+"&t="+d.getTime(),function(result){
                $("#box").val(result);
                $('#box').scrollTop(g);
            var str = result.substr(-5,4)
            if(str == '[ok]' || str=='[ok]\n'){
                window.clearInterval(timer);
                alert('完成');
            }
        });
   }
</script>
<div class="list">
    <div class="line">
        <form>
             <input name="" type="hidden" id="filename" value="{{escape(log_file)}}" />
             <textarea name="" cols="80%" rows="12" readonly id="box">
             </textarea>
             <button onclick="window.clearInterval(timer)">完成</button>
        </form>
    </div>
</div>
{% end %}
